<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
        <title>Document</title>
        <style>
            * {
                margin: 0;
                padding: 0;
                list-style: none;
            }
            ul {
                display: grid;
                width: 300px;
                height: 300px;
                margin: 200px auto;
                border: 1px solid #000;
                grid-template-rows: repeat(3, 1fr);
                grid-template-columns: repeat(3, 1fr);
                justify-items: center;
                align-items: center;
            }
            li {
                display: flex;
                width: 50px;
                height: 50px;
                justify-content: center;
                align-items: center;
                background-color: brown;
                color: #fff;
            }
            li:nth-last-of-type(1) {
                justify-self: end;
                align-self: flex-end;
                place-self: end flex-end;
            }
        </style>
    </head>
    <body>
        <ul>
            <li>1</li>
            <li>2</li>
            <li>3</li>
            <li>4</li>
            <li>5</li>
            <li>6</li>
            <li>7</li>
            <li>8</li>
            <li>9</li>
        </ul>
    </body>
</html>
